package com.nbsaas.boot.finance.data.entity;

import com.nbsaas.boot.code.annotation.*;
import com.nbsaas.boot.jpa.data.entity.AbstractEntity;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;
import lombok.Data;
import org.hibernate.annotations.Comment;

import java.math.BigDecimal;

@CreateByUser
@ComposeView
@Data
@FormAnnotation(title = "预算", model = "预算")
@Entity
@Table(name = "bs_budget")
@Comment("预算表")
public class Budget extends AbstractEntity {

    @Comment("年度")
    @FormField(title = "年度", sortNum = "1", grid = true, required = true)
    @Column(length = 10, nullable = false)
    private String year;

    @Comment("部门")
    @FormField(title = "部门", sortNum = "2", grid = true)
    @Column(length = 100)
    private String department;

    @Comment("预算总额")
    @FormField(title = "预算总额", sortNum = "3", grid = true, type = InputType.el_input_number)
    private BigDecimal totalAmount;

    @Comment("状态")
    @FormField(title = "状态", sortNum = "4", grid = true, type = InputType.select)
    @Column(length = 20)
    private String status;

    @Comment("备注")
    @FormField(title = "备注", sortNum = "5", type = InputType.textarea)
    private String remark;
} 